﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

namespace BehaviorSystem
{
    /// <summary>
    /// 行为树节点接口
    /// </summary>
    public interface IBehaviourNode
    {
        /// <summary>
        /// 当前节点状态
        /// </summary>
        BTNodeState CurState { get; }

        /// <summary>
        /// 是否需要每次Tick都重新执行一边
        /// </summary>
        bool IsNeedReDoPerTick { get; }

        /// <summary>
        /// 子节点
        /// </summary>
        List<IBehaviourNode> ChildrenNodes { get; }

        /// <summary>
        /// 添加子节点
        /// </summary>
        /// <param name="childNode"></param>
        void AddChildrenNode(IBehaviourNode childNode);

        /// <summary>
        /// 执行节点
        /// </summary>
        /// <returns></returns>
        BTNodeState ExcuteNode();

        /// <summary>
        /// 重置节点
        /// </summary>
        void ResetNode();


    }
}